
import 'dart:collection';
import 'dart:convert';

import 'package:ai/response/BaseResponse.dart';

import '../response/TextAppResponse.dart';
import '../response/TextRecordResponse.dart';
import '../util/DioUtil.dart';

class TextRecordService{

  Future<List<TextRecord>> list(int textAppId,int pageNumber) async {
    Map<String, dynamic> params = {
      'textAppId': textAppId,
      'pageNumber': pageNumber,
    };
    var response = await DioUtil().post('/member/writeTask/list',data: params);
    var textRecordResponse = TextRecordResponse.fromJson(response.data);
    return textRecordResponse.data;
  }
  Future<String> detail(int textAppId) async {
    Map<String, dynamic> params = {
      'textAppTaskId': textAppId,
    };
    var response = await DioUtil().post('/member/writeTask/view',data: params);
    var textRecordResponse = BaseResponse.fromJson(response.data);
    return textRecordResponse.data;
  }

}